package org.gd.hellojaxb.jmeter;

import org.gd.hellojaxb.utils.Marshall;
import org.gd.hellojaxb.utils.MarshallProperties;
import org.gd.hellojaxb.utils.UnMarshall;

import java.io.InputStream;

/**
 * @author Gorhover
 * @version 1.0-SNAPSHOT
 * @since 2013-10-11 17:11
 */
public class App {

    private static final ClassLoader LOADER = App.class.getClassLoader();

    public static void main(String[] args) {
        try {
            InputStream inputStream = LOADER.getResourceAsStream("CreateRetNew_VP_RETNEW_VP.xml");
            JmeterTestPlan jmeter = UnMarshall.unmarshal(inputStream, JmeterTestPlan.class);

            System.out.println(Marshall.getInstance().marshal(jmeter, MarshallProperties.FORMATTED_OUTPUT));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
